# Contributor: Luca Weiss <luca@lucaweiss.eu>
# Maintainer: Luca Weiss <luca@lucaweiss.eu>
pkgname=ncpamixer
pkgver=1.3.8
pkgrel=0
pkgdesc="ncurses PulseAudio Mixer"
url="https://github.com/fulhax/ncpamixer"
arch="all"
license="MIT"
makedepends="cmake pulseaudio-dev ncurses-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/fulhax/ncpamixer/archive/$pkgver.tar.gz"
options="!check" # no tests

build() {
	# src/ui/tab.cpp accesses struct tagITEM which has been made opaque
	export CXXFLAGS="$CXXFLAGS -DNCURSES_INTERNALS"

	cmake "$builddir"/src \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr
	make
}

package() {
	DESTDIR="$pkgdir" make install
}

sha512sums="
a50147861f0cabee40b24143f8e1e34290aa74622a46afa751352d691398ea87979a3a1e6c2f44cca8f02428135354b2b485f6fc21b388955a750155a1763cfb  ncpamixer-1.3.8.tar.gz
"
